<?php
require_once $_SERVER['DOCUMENT_ROOT'].'/actions/Action.php';
require_once $_SERVER['DOCUMENT_ROOT'].'/actions/Response.php';
require_once $_SERVER['DOCUMENT_ROOT'].'/const/Menu.php';

final class MainAction extends Action {
	protected function accessIdentities() {
		return null;
	}

	protected function execute(Response $response) {
		if(isset($_SESSION['menu'])) {
			$menu = unserialize($_SESSION['menu']);
			$uri = array_keys($menu);
			$response->setActionPath($uri[0]);
		} else {
			$response->setActionPath('/login.html');
		}
	}
}
?>